
public class OddandEven {


	public static void main(String[] args) {
		int a[] = {1,3,5,7, 9 ,2, 4, 6, 8, 10};
		int b[] = new int[10];
		for(int i = 0, j = 0, k= 0; i<a.length; i++){
			if(a[i]%2 == 0){
				b[2*k+1] = a[i];
				k++;
			}
			else{
				b[2*j]=a[i];
				j++;
			
			}
		}
		System.out.print(b);

	}

}
